// 仪表盘API的混合数据版本
import { hybridRequest } from './hybridApi';

// 获取仪表盘概览
export const getDashboardOverview = () => {
  return hybridRequest('/dashboard/overview', { method: 'GET' });
};

// 获取仪表盘统计
export const getDashboardStats = (params) => {
  return hybridRequest('/dashboard/stats', { method: 'GET', params });
};

// 获取仪表盘趋势
export const getDashboardTrends = (params) => {
  return hybridRequest('/dashboard/trends', { method: 'GET', params });
};

// 获取告警数据
export const getDashboardAlerts = (params) => {
  return hybridRequest('/dashboard/alerts', { method: 'GET', params });
};

// 获取设备状态分布
export const getDeviceStatusDistribution = () => {
  return hybridRequest('/dashboard/device-status', { method: 'GET' });
};

// 获取空气质量变化
export const getAirQualityChanges = (period) => {
  return hybridRequest('/dashboard/air-quality', { 
    method: 'GET', 
    params: { period } 
  });
};

// 获取仪表盘综合数据
export const getDashboardData = (params) => {
  return hybridRequest('/dashboard/data', { method: 'GET', params });
};
